﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;

namespace WinSPen.Settings
{
    public enum FontStyle
    {
        Normal = 0,
        Bold = 1,
        Italic = 2,
        Underline = 4,
    }

    internal class TextSetting
    {
        private static TextSetting _instance;

        public static TextSetting GetInstance()
        {
            if (_instance == null)
            {
                _instance = new TextSetting();
            }
            return _instance;
        }

        private TextSetting() { }

        private FontFamily _font;

        /// <summary>
        /// 설정된 Font
        /// </summary>
        public FontFamily Font
        {
            get
            {
                if (this._font == null)
                {
                    this._font = new FontFamily();
                }
                return this._font;
            }
            set
            {
                this._font = value;
            }
        }

        private Color _textColor = Colors.Black;

        /// <summary>
        /// 설정된 Text의 색상
        /// </summary>
        public Color TextColor
        {
            get
            {
                if (this._textColor == null)
                {
                    this._textColor = new Color();
                }
                return this._textColor;
            }
            set
            {
                this._textColor = value;
            }
        }

        private double _fontSize = 10;

        /// <summary>
        /// 설정된 Font의 Size
        /// </summary>
        public double FontSize
        {
            get { return this._fontSize; }
            set { this._fontSize = value; }
        }

        private FontStyle _style = FontStyle.Normal;

        /// <summary>
        /// 설정된 Text의 Style (Bold, Italic, Underline)
        /// </summary>
        public FontStyle Style
        {
            get { return this._style; }
            set { this._style = value; }
        }
    }
}
